Skip to content

Instantly share code, notes, and snippets.

@proppy
proppy / containers.yaml
Last active May 21, 2024 14:56
validate yaml file with gojsonschema
containers:
- image: "dockerfile/nginx"
ports:
- containerPort: 80
hostPort: 8080
@paustint
paustint / ApexUtils.cls
Last active May 21, 2024 14:52
Apex Utility Classes / CPQ Quote Calculator Plugin Example
/**
* Utility class for common operations
*
* Any classes that use Schema.SObjectField, this property is object by calling "Schema.Account.Description"
* This allows type safety to ensure that code will not break if fields are changed
* this will not work with person accounts
*
* (c) Advanced Technology Group, 2019
* This code may be used and modified freely as long as this copyright attribution
* is included with the code.
@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active May 21, 2024 14:52
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.
@mrpeardotnet
mrpeardotnet / PVE-HP-ssacli-smart-storage-admin.md
Created November 25, 2019 22:10
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@plembo
plembo / CalibreServerOnLinux.md
Last active May 21, 2024 14:50
Calibre Server on Linux

Calibre Server on Linux

Introduction

Calibre is a powerful cross-platform, open source, ebook manager and editing platform. Its calibre-server component can be used to publish an e-book library on a local network. While you can launch calibre-server as a desktop application, it can also be run as a daemon on a headless Linux server.

This tutorial on setting up calibre-server using Ubuntu 14.04 is very good, but dated.

@igorjs
igorjs / rest-api-response-format.md
Last active May 21, 2024 14:49
REST API response format based on some of the best practices
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 21, 2024 14:49
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@nathandaly
nathandaly / modal.blade.php
Last active May 21, 2024 14:48
Alpine Bootstrap Modal
<div name="{{ $name }}"
x-cloak
x-data="{ show: false, name: '{{ $name }}', details: null }"
@modal.window="
show = ($event.detail.name === name);
details = $event.detail;
"
@modal:close-all.window="show = false"
class="modal d-block"
tabindex="-1"